﻿namespace Leo.Common.Kafka
{
    public class KafkaConsumerConfig
    {
         
        public string ClientId { get; set; }

       
        public string GroupId { get; set; }

        
        public string Topic { get; set; }

        
        internal string Broker { get; set; }
        
        public override bool Equals(object obj)
        {
            if (!object.Equals(obj, null))
            {
                KafkaConsumerConfig kafkaConsumerConfig = obj as KafkaConsumerConfig;
                if (kafkaConsumerConfig != null)
                {
                    return this.ClientId == kafkaConsumerConfig.ClientId && this.Topic == kafkaConsumerConfig.Topic && this.GroupId == kafkaConsumerConfig.GroupId;
                }
            }
            return false;
        }
        
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        
        public static bool operator ==(KafkaConsumerConfig left, KafkaConsumerConfig right)
        {
            bool flag = object.Equals(left, null);
            bool flag2 = object.Equals(right, null);
            return (flag && flag2) || (!flag && !flag2 && left.Equals(right));
        }
        
        public static bool operator !=(KafkaConsumerConfig left, KafkaConsumerConfig right)
        {
            return !(left == right);
        }
    }
}
